import Image from "next/image"; import { Inter, Permanent_Marker } from "next/font/google"; import { GeistSans } from "geist/font/sans"; import { GeistMono } from "geist/font/mono"; import { cn } from "@/shared/lib/utils"; import { getServerUrl } from "@/shared/lib/server-url"; import { FB_PIXEL_ID } from "@/shared/lib/facebook/fb-pixel"; import { SiteConfig } from "@/shared/config/site-config"; import { ThemeSynchronizer } from "@/features/theme/ui/ThemeSynchronizer"; import { Header } from "@/features/layout/Header"; import { Footer } from "@/features/layout/Footer"; import { TailwindIndicator } from "@/components/utils/TailwindIndicator"; import { NextTopLoader } from "@/components/ui/next-top-loader"; import FacebookPixel from "@/components/FacebookPixel"; import { Providers } from "./providers"; import type { ReactElement } from "react"; import type { Metadata } from "next"; import "@/shared/styles/globals.css"; export const metadata: Metadata = { title: { default: SiteConfig.title, template: `%s | ${SiteConfig.title}`, }, description: SiteConfig.description, metadataBase: new URL(getServerUrl()), robots: { index: true, follow: true, googleBot: { index: true, follow: true, "max-snippet": -1, "max-image-preview": "large", "max-video-preview": -1, }, }, openGraph: { title: SiteConfig.title, description: SiteConfig.description, url: getServerUrl(), siteName: SiteConfig.title, images: [ { url: `${getServerUrl()}/images/default-og-image_fr.png`, width: 1200, height: 630, alt: SiteConfig.title, }, { url: `${getServerUrl()}/images/default-og-image_en.png`, width: 1200, height: 630, alt: SiteConfig.title, }, ], locale: "fr_FR", type: "website", }, twitter: { card: "summary_large_image", site: "@workout_cool", title: SiteConfig.title, description: SiteConfig.description, images: [`${getServerUrl()}/images/default-og-image_fr.png`], }, alternates: { canonical: "https://www.workout.cool", languages: { fr: "https://www.workout.cool/fr", en: "https://www.workout.cool/en", }, }, authors: [{ name: "Workout Cool", url: "https://www.workout.cool" }], icons: { icon: [ { url: "/images/favicon-32x32.png", sizes: "32x32", type: "image/png" }, { url: "/images/favicon-16x16.png", sizes: "16x16", type: "image/png" }, { url: "/images/favicon.ico", type: "image/x-icon" }, ], apple: "/apple-touch-icon.png", }, }; const inter = Inter({ subsets: ["latin"], variable: "--font-inter", display: "swap", }); const permanentMarker = Permanent_Marker({ weight: "400", subsets: ["latin"], variable: "--font-permanent-marker", display: "swap", }); export const preferredRegion = ["fra1", "sfo1", "iad1"]; interface RootLayoutProps { params: Promise<{ locale: string }>; children: ReactElement; } export default async function RootLayout({ params, children }: RootLayoutProps) { const { locale } = await params; return ( <>
{/* eslint-disable-next-line @next/next/no-page-custom-font */} {/* Alternate hreflang for i18n */} {/* Balise theme-color unique, synchronisée dynamiquement */} {/* TODO: maybe add some ads ? */}